package com.hucc.redislock.result;

public class Result<T> {
    private boolean success = false;

    private Integer code;

    private String errorMessage;

    private T data;

    public Result() {
    }

    public Result(boolean success, Integer code, String errorMessage, T data) {
        this.success = success;
        this.code = code;
        this.errorMessage = errorMessage;
        this.data = data;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
